<template>
  <dv-scroll-ranking-board :config="config"/>
</template>
<script>

import { getHotList } from '@/api/dataECharts'

export default {
  data() {
    return {
      list: [],
      config: {}
    }
  },
  methods: {
    async getList() {
      let { rows } = await getHotList()
      this.list = rows
      this.config.data = this.list.map(item => {
        return { name: item.bookName, value: item.lendMessageCount }
      })
      this.config = { ...this.config }
    }
  },
  mounted() {
    this.getList()
  }
}

</script>

<style scoped lang="scss">
.dv-scroll-ranking-board {
  width: 80%;
}
</style>
